Trigger Trouble

Good afternoon,

I installed a "Module Open Trigger" in my modules so that everytime a user opens a module they will get a notice in an infobox, the trigger is working, however everytime I switch views I get the infobox, which I don't want I only want it when the module is first opened. The problem I am having is that I am testing RPE and everytime it generates a document if I have different views on the document specification the infobox appears for every view having the user to click ok everytime it comes out, delaying the document generation.

How can I solve my problem, any help will be much appreciated.

Thanks,

Mady
DXLUser - Wed Dec 21 16:22:47 EST 2011

Re: Trigger Trouble
llandale - Wed Dec 21 16:57:32 EST 2011

Post the code.

The trigger should be post-open-module; I suppose deployed in the Project and not in each individual module. Seems to me it should do nothing unless the module is visible. Perhaps its not triggering on a new view, but rather on the modules opened invisibly in those new views (by a layout).

Don't know of a trigger that will fire on loading a view. Don't know if RPE can be doing something odd.

-Louie

Re: Trigger Trouble
kbmurphy - Wed Dec 21 23:06:28 EST 2011

llandale - Wed Dec 21 16:57:32 EST 2011
Post the code.

The trigger should be post-open-module; I suppose deployed in the Project and not in each individual module. Seems to me it should do nothing unless the module is visible. Perhaps its not triggering on a new view, but rather on the modules opened invisibly in those new views (by a layout).

Don't know of a trigger that will fire on loading a view. Don't know if RPE can be doing something odd.

-Louie

You should also set, in the dsx file in RPE, the option to disable triggers upon logging into DOORS in your DOORS Parameters. Unless you're relying on those triggers to fire so RPE has correct data....

Re: Trigger Trouble
DXLUser - Thu Dec 22 08:24:05 EST 2011

llandale - Wed Dec 21 16:57:32 EST 2011
Post the code.

The trigger should be post-open-module; I suppose deployed in the Project and not in each individual module. Seems to me it should do nothing unless the module is visible. Perhaps its not triggering on a new view, but rather on the modules opened invisibly in those new views (by a layout).

Don't know of a trigger that will fire on loading a view. Don't know if RPE can be doing something odd.

-Louie

Hi,

Here is the code I'm using:

**********************************************
pragma runLim, 0
#include <include/My File.inc>

Folder f = current
Item i
int x=0

for i in f do {

x=0
if (type i == "Formal") then {
Module m = read(fullName(i), false)
Trigger w = trigger("Notice on Module Open", module->(fullName(m)""), post, open, 10, "#include <triggers/Notice on Module Open.dxl>")
close (m)
}
}
************************************************

Thanks for your fast response.

Mady

Re: Trigger Trouble
DXLUser - Thu Dec 22 09:08:48 EST 2011

kbmurphy - Wed Dec 21 23:06:28 EST 2011
You should also set, in the dsx file in RPE, the option to disable triggers upon logging into DOORS in your DOORS Parameters. Unless you're relying on those triggers to fire so RPE has correct data....

Hi Kevin,

What do I do to disable a DOORS Trigger in the DOORS Parameter in RPE?

(Sorry I'm just new to RPE)

Thanks,

Mady

Re: Trigger Trouble
llandale - Thu Dec 22 11:25:24 EST 2011

DXLUser - Thu Dec 22 08:24:05 EST 2011
Hi,

Here is the code I'm using:

**********************************************
pragma runLim, 0
#include <include/My File.inc>

Folder f = current
Item i
int x=0

for i in f do {

x=0
if (type i == "Formal") then {
Module m = read(fullName(i), false)
Trigger w = trigger("Notice on Module Open", module->(fullName(m)""), post, open, 10, "#include <triggers/Notice on Module Open.dxl>")
close (m)
}
}
************************************************

Thanks for your fast response.

Mady

Pretty sure about these impressions:
  • You need to explicitely set the current Folder, unless the user has already selected it and THEN you send DOORS this code.
    • current = folder("/SelectedProject/SelectedFolder")
  • Module must be opened Exclusive
  • Module must be saved
  • You should first delete the trigger named "Notice on Module Open". IRC if it exists it will not be replaced.

Its a lot easier to manage project-level triggers. It gets the "current" module and decides based on that if is should do something or not.

  • Louie

Re: Trigger Trouble
kbmurphy - Thu Dec 22 12:21:39 EST 2011

DXLUser - Thu Dec 22 09:08:48 EST 2011
Hi Kevin,

What do I do to disable a DOORS Trigger in the DOORS Parameter in RPE?

(Sorry I'm just new to RPE)

Thanks,

Mady

Mady,

In the doors_param, add a " -T" without the quotes. This is the same as starting DOORS with a -T, which will disable triggers. So it's not really an RPE thing--it's more of a a DOORS feature. You must be a database manager in order to disable triggers.

Have fun.
Kevin